{% extends 'base.html' %}
{% load static app_extras %}
{% block title %}IT设备申请{% endblock title %}

{% block extra_style %}
  <link rel="stylesheet" type="text/css" href="{% static 'lib/dataTable/datatables.min.css' %}">
  <link rel="stylesheet" type="text/css" href="{% static 'css/index.css' %}">
{% endblock extra_style %}

{% block content %}
{% comment %}
<div class="panel panel-default">
  <div class="panel-heading">
    <span>查询内容</span>
    <button class="search-action btn btn-info">查询</button>
  </div>
  <div class="panel-body"> </div>
</div>
{% endcomment %}
  <div class="panel panel-default">
    <div class="panel-heading">申请列表</div>
    <div class="panel-body">
      <table id="app_list_table" class="table table-hover dataTable">
        <thead>
          <tr>
            <td>序号</td>
            <td>员工编号</td>
            <td>姓名</td>
            <td>项目名</td>
            <td>申请数量</td>
            <td>大致预算</td>
            <td>申请时间</td>
            <td>详细附件</td>
            <td>备注</td>
            <td>审批进度</td>
          </tr>
        </thead>
        <tbody>
          {% for app in applications %}
            <tr>
              <td>{{ app.id }}</td>
              <td>{{ app.user_id }}</td>
              <td>{{ app.user_name }}</td>
              <td>{{ app.project_name }}</td>
              <td>{{ app.server_count }}</td>
              <td>{{ app.budget }}</td>
              <td>{{ app.pub_date|date:"Y-m-d H:i" }}</td>
              <td><a href="/uploads/{{ app.detail_file.name }}" title="{{ app.detail_file.name|basename }}">下载</a></td>
              <td><pre>{{ app.remark }}</pre></td>
              <td>
                <span>{{ app.approval__text }}</span>
              </td>
            </tr>
          {% endfor %}
        </tbody>
      </table>
    </div>
{% endblock content %}
{% block extra_script %}
  <script src="{% static 'lib/dataTable/datatables.min.js' %}"></script>
  <script src="{% static 'js/index.js' %}"></script>
{% endblock extra_script %}
